String[].SortUsing (gb)
Function SortUsing ( Order As Array [ , Mode As Integer ] ) As String[]
Desde 3.13
Sort the array using the order defined by the
Order array.
In other words, sort the array by using the substitution generated by
Order.Sort()
.
The two arrays must have the same number of elements, otherwise an error is raised.
Note that the SortUsing method has to create a temporary integer array of the same size as the sorted array.
If your array is big, the required memory cannot be neglected.
Examples
Dim aSort As String[] = ["A", "B", "C", "D", "E"]
Dim aOrder As Integer[] = [4, 1, 2, 10, 8]
aSort.SortUsing(aOrder)
Print "["; aSort.Join(", "); "]"
See also